import { createLog } from "@/api/log";
import type { Log } from "@/api/log/type";
import { useUserStore } from "@/stores/user";

export const saveLog = async () => {
    const userStore = useUserStore();
    const userId = userStore.getId;
    // const ip = await getUserIp();
    const log = {
        userId,
        type: 'VisitAdmin',
        content: '访问系统'
    } as Log;
    createLog(log);
}